"""原生应用测试"""
from appium import webdriver
from appium.webdriver.common.touch_action import TouchAction
caps = {}
caps["automationName"] = "Appium"
caps["platformName"] = "android"
caps["platformVersion"] = "6.0"
caps["appPackage"] = "com.android.contacts"
caps["appActivity"] = "/.DialtactsActivityAlias"
caps["deviceName"] = "oppo R9sk"
caps["noReset"] = True

driver = webdriver.Remote("http://localhost:4723/wd/hub",caps)
#添加单击按钮
TouchAction(driver).tap(x=[966,54],y=[1038,180]).perform()
# [966,54][1038,180]

#输入联系人信息
driver.find_element_by_android_uiautomator("text('Name')").send_keys("Tom")
driver.find_element_by_android_uiautomator("text('Phone')").send_keys("18793637427")
#保存联系人
driver.find_element_by_android_uiautomator("")
